<?php
function isLogin(){
    if (!session('?session_id'))
    {
        redirect(U('Home/Login/login'));
    }
}

function toAdmin(){
    if (session('?session_id'))
    {
        redirect(U('Home/Index/index'));;
    }
}